In the field of computer graphics, pictorial information is often stored as a bitmap, in which each pixel of an image corresponds to 1 or more bits in the bitmap. Monochrome bitmaps require only 1 bit per pixel (or "bpp"); color bitmaps require additional bits to indicate the color of each pixel. Typically, color pixels are represented by 4, 8, 16, or 24 bits per pixel.
Often all or part of a bitmap must be moved from one location in a computer's memory (the "source" location) to another location (the "destination" location). Transfers of this type are called bitmap block transfers, or "blt"s for short, and are typically carried out by a computer's operating system in response to a function call from an application program. For example, an application program may have "drawn" a figure on a bitmap in a source memory location by changing the numeric values of the bits in the bitmap. To display the figure rapidly on the screen of a display device, the bitmap is block transferred (or "blitted") from the source memory location to the video display (destination) memory location. A display device associated with the video display memory then displays the bitmap containing the figure. The video display memory is also commonly referred to as the screen memory or frame buffer for the display device.
Often there is a need to change a bitmap as it is transferred from the source to the destination in memory. These changes might be required for a number of reasons. First, the source and destination may have different color formats for their bitmaps. For example, a bitmap in the source may represent color information with red, green and blue intensities in color components per pixel, in that order. A bitmap in the destination, meanwhile, may require these color components to be in a different order, such as blue, green and then red. In such a case, the order of the color information must be altered to match the order in which color information is represented in the destination during the block transfer. (This change in format is referred to as a "color model conversion").
Second, the bitmaps of the source and destination might be different sizes. For example, the source's bitmap may have rectangular dimensions of 10.times.10 pixels, but an application program might want the bitmap transferred to the video display memory location and displayed with dimensions of 20.times.20 pixels. Accommodating this change in size can also be done during the block transfer. (This operation is referred to as "stretching").
Third, a portion of the source's bitmap, with or without a change in size, may be fit into a smaller rectangular area of the destination's bitmap. For example, a portion of a 300.times.450 pixel bitmap in the source may be fit into a 70.times.120 pixel area of the destination's bitmap. To accomplish this change, the border areas of the source bitmap may be omitted. (This operation is referred to as "clipping," and is particularly useful in a graphical user interface where a large bitmap can be scrolled through a smaller window or where a bitmap is transferred into a window which is overlapped by another window.)
These block transfers of data between memory locations should be as fast as possible, since they occur frequently and involve the movement of large amounts of data. For example, in the process of opening different windows in a graphical user interface, many data blocks are transferred into the display memory to produce the windows' color, text and graphics. Therefore the slower the rate of transfer, the slower the rate at which the computer system operates. When an image transformation also is included with a block transfer, the transfer rate can be particularly slow.
Prior approaches for data block transfers with image transformations have been inefficient. In a typical prior approach, the image transformation is processed separately for each byte or pixel to be transferred into the destination bitmap. (A byte is a group of bits such as 8, and is normally the smallest addressable segment of data in a memory.) For example, the block transfer may be implemented in code that embeds a byte transfer operation within a loop, so that the byte transfer operation is repeated once for each byte of the data block to be transferred. To also perform an image transformation with the block transfer, an operation which determines the transform also is included in the loop and repeated for each byte transferred. As data block transfers typically involve thousands of bytes, repeating the transform operation for each byte can significantly decrease the data block transfer's rate.
Accordingly, an object of this invention is to perform data block transfers which include image transformations more rapidly than before. Another object of the invention is to reduce the time required for processing the image transformation during a data block transfer.